﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace FCTC_Web.Models
{
    public class Personal : EntityBase
    {
        [Display(Name="全名")]
        [Required]
        [MaxLength(20)]
        public string FullName{ get; set;}

        [MaxLength(20)]
        [Display(Name = "性别")]
        public string Gender { get; set; }

        [MaxLength(50)]
        [DataType(DataType.EmailAddress), RegularExpression(@"^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$")]
        [Display(Name = "电子信箱")]
        public string Email { get; set; }

        [MaxLength(20)]
        [Display(Name = "昵称")]
        public string NickName { get; set; }


        [Display(Name = "联系手机")]
        [DataType(DataType.Text), MaxLength(30),RegularExpression(@"(13[0-9]{9}|18[0-9]{9}|15[0-9]{9})|(^(\d{3,4}-)?\d{7,8})$", ErrorMessage = "请填写正确的联系电话")]
        public string Contact { get; set; }
    }
}
//^(13[0-9]|15[0|3|6|7|8|9]|18[8|9])\d{8}$